#!/bin/bash
# Zaitan Module - Wine-Doors Install
# Zaitan Team <http://code.google.com/p/zaitan/>

RMOD_ENGINE='2.0'
RMOD_CATEGORY='Software'
RMOD_SUBCATEGORY='Ferramentas'
RMOD_NAME='Wine-Doors'
RMOD_AUTHOR='Zaitan Team'
RMOD_VERSION='0.1-1'
RMOD_DESCRIPTION='Installs Wine-Doors'
RMOD_UPDATE_URL='http://code.google.com/p/zaitan/'

# install Wine-Doors
#/usr/lib/zaitan/modulo/mod-checkInstall


i='wine-doors'
VERIFIQ=$(dpkg -s "$i" 2> /dev/null | grep "Status:" | awk '{ print $3 }')


	if [ "$VERIFIQ" != "ok" ]; then

		cd /usr/share/zaitan
		apt-get update
		wget -c http://mirrors.dotsrc.org/getdeb/wi/wine-doors_0.1-1~getdeb1_all.deb
		dpkg -i wine-doors_0.1-1~getdeb1_all.deb
		apt-get -f install
		wget -c http://mirrors.dotsrc.org/getdeb/wi/wine_0.9.44-1~getdeb1_i386.deb
		dpkg -i wine_0.9.44-1~getdeb1_i386.deb
	
	else
		echo "$i já está instalado"
	sleep 2
fi




echo $RMOD_NAME Finibashed...

##Logs
echo $RMOD_NAME-$RMOD_VERSION | tee -a /usr/share/zaitan/logs
/usr/lib/zaitan/modulo/mod-logs
##

exit 0

